function label = oneHotDecode(mat)

% decoding original categorical variable value 
% after application of one-hot-encoding scheme
% 
% input: one-hot-encoded mat
%
% output: label

size = length(mat);

for i = 1:size
    if mat(i) == 1
        label = i;
        break;
    end
end

end